package com.itheima.io1.mytest;

import java.io.*;

/**
 * @author zhangbaiyan
 * @date 2024-09-20 20:09
 * @description: 文件依或加密
 * @version:
 */
public class test {
    public static void main(String[] args) throws IOException {
        File src = new File("C:\\Users\\17685\\Desktop\\copy\\绩点.png");
        File dst = new File("C:\\Users\\17685\\Desktop\\copy\\绩点2.png");
        FileInputStream fis = new FileInputStream(src);
        FileOutputStream fos = new FileOutputStream(dst);
        //3.加密处理
        int b;
        while ((b=fis.read())!=-1){
            fos.write(b^2);
        }

        fos.close();
        fis.close();
    }
}
